    <div class="container">
      <div class="bg-putih">
        <div class="jdl-page">
          <?php echo isset($judul)?$judul:'<font color="#ccc">Judul Belum Diberikan</font>'; ?>
          <div class="clearfix"></div>
        </div>

        <?php echo form_open(uri_string(), array('class' => 'form-horizontal', 'role' => 'form', 'id' => 'form')); ?>
        
        <script type="text/javascript">
          $(document).ready(function() {
            $(".obat").select2();
          });
        </script>
        <div class="form-group">
          <label class="col-xs-2 control-label">Kode Interaksi</label>
          <div class="col-xs-10">
            <input type="text" name="kode" class="form-control input-sm" value="<?php echo $data['KdInteraksi'] ?>" />
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2 control-label">Obat 1</label>
          <div class="col-xs-10">
            <input type="hidden" value="<?php echo $data['KdInteraksi'] ?>" name="KdInteraksi">
            <select class="obat js-example-basic-single js-states form-control" name="obat1">
            <?php  
            $obat_getter = $this->db->get('obat');
            $res_obat_getter = $obat_getter->result_array();            
            foreach($res_obat_getter as $obat):
            ?>
            <?php if($obat['KdObat'] == $data['KdObat']): ?>
              <option value="<?php echo $obat['KdObat'] ?>" selected="selected"><?php echo $obat['NmObat'] ?></option>
            <?php else: ?>
              <option value="<?php echo $obat['KdObat'] ?>"><?php echo $obat['NmObat'] ?></option>
            <?php endif; ?>
            <?php
            endforeach;
            ?>
          </select>
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-2 control-label">Obat 2</label>
          <div class="col-xs-10">            
           <select class="obat js-example-basic-single js-states form-control" name="obat2">
            <?php  
            $obat_getter = $this->db->get('obat');
            $res_obat_getter = $obat_getter->result_array();
            foreach($res_obat_getter as $obat):
            ?>
            <?php if($obat['KdObat'] == $data['KdObat2']): ?>
              <option value="<?php echo $obat['KdObat'] ?>" selected="selected"><?php echo $obat['NmObat'] ?></option>
            <?php else: ?>
              <option value="<?php echo $obat['KdObat'] ?>"><?php echo $obat['NmObat'] ?></option>
            <?php endif; ?>
            <?php
            endforeach;
            ?>
          </select>
        </div>
      </div>
      <div class="form-group">
        <label class="col-xs-2 control-label">Interaksi</label>
        <div class="col-xs-10">
          <textarea class="form-control" name="interaksi"><?php echo $data['Interaksi'] ?></textarea>
        </div>
      </div>      
      <div class="form-group">
        <div class="col-xs-offset-2 col-xs-10">
          <button type="submit" class="btn btn-primary btn-sm">Simpan</button>
          <button type="reset" class="btn btn-default btn-sm">Kosongkan</button>
        </div>
      </div>
      <?php echo form_close(); ?>

      <div class="clearfix"></div>
    </div>
  </div> <!-- /container -->

  <script>
   $("#form").validate({
    rules: {
      obat1: {
        required: true
      },
      obat2: {
        required: true         
      },
      interaksi: {
        required: true         
      }
    }
  });
 </script>